import Loading from "./Loading.vue";
import Vue from "vue";

const LoadingConstructor = Vue.extend(Loading);

const LoadingService =()=>{
    //创建一个loading对象
    var loading = new LoadingConstructor();
    //创建loading挂载元素
    var divElement = document.createElement("div");
    //将组件挂载到元素
    loading.$mount(divElement);
    document.body.appendChild(loading.$el);
    loading.$nextTick(()=>{
        loading.isShowLoading = true;
    })
    return loading;
    
}
export default LoadingService;